package com.foreknow.demo2;

import java.util.Scanner;

public class LoopDemo2 {
    public static void main(String[] args) {
        System.out.println("******");
        System.out.println("1.客户信息管理");
        System.out.println("2.结算");
        System.out.println("3.反馈");
        System.out.println("4.注销");
        System.out.println("******");
        Scanner input = new Scanner(System.in);
        System.out.println("请选择数字");
        int choice = 0;
        boolean isRigth = false;
        do {
            isRigth = true;
            choice = input.nextInt();
            if (choice == 1){
                System.out.println("执行客户信息");
            }else if (choice == 2){
                System.out.println("结算");
            }else if (choice == 3){
                System.out.println("反馈");
            }else if (choice == 4){
                System.out.println("注销");
            } else {
                System.out.println("输入错入，请重新输入数字");
                isRigth = false;
            }
        }while (!isRigth);
        System.out.println("程序结束了！！！！");
    }
}
